<script setup lang='ts'>
import { computed } from 'vue'
const props = defineProps({
  prefix: {
    type: String,
    default: 'icon'
  },
  name: {
    type: String,
    required: true
  },
  color: {
    type: String,
    default: ''
  },
  size:{
    type:Number,
    default:15
  }
})

const iconSize = computed(() => {
  return props.size
})

const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>

<template>
  <svg aria-hidden="true" :style="{fontSize:iconSize+'px',width:iconSize+'px',height:iconSize+'px',color:color?color:undefined}" fill="currentColor">
    <use :xlink:href="symbolId" />
  </svg>
</template>

<style scoped>
</style>